import ToolActionApi from "@/tool/http/tool-action.js";

let dictAction = ToolActionApi.init("common_dict");

const rule = {
	queryParams: [],
	pageConfig: {},
	metaConfig: {
		"user_id": {
			hidden: true
		}
	},
	baseField: [{
		name: "id"
	}],
	loadData: dictAction.tree
}

export default async function(metadata) {
	rule.metaConfig.pid = {
		dictList: [{ name: "默认", val: 0, children: await dictAction.tree() }]
	}
	return rule;
}
